case "addmodule":
	$module_name = $_POST['module_name'];
	$module_code = $_POST['module_code'];
	$classes = $_POST['classes'];
	$criteria = $_POST['criteria'];
	if($student_name && $student_code)
	{
		$dbTable = new db_students();
		$dbTable[0] = Array("student_code"=>$student_code, "student_name"=>$student_name);
		$dbTable->save();
	}
	if($classes)
	{
		$i = 0;
		$dbTable2 = new db_connect_module_class();
		foreach($classes as $class)
		{
			$dbTable2[$i] = Array("class_code"=>$class, "module_code"=>$module_code);
			$i++;
		}
		$dbTable2->save();
	}
	if($criteria)
	{
		$i = 0;
		$dbTable3 = new db_connect_module_criteria();
		foreach($criteria as $crit)
		{
			$dbTable3[$i] = Array("criteria_id"=>$crit['id'], "module_code"=>$module_code, "description"=>$crit['description']);
			$i++;
		}
		$dbTable3->save();
	}
break;